<?php
// +----------------------------------------------------------------------
// | OneKeyAdmin [ Believe that you can do better ]
// +----------------------------------------------------------------------
// | Copyright (c) 2020-2023 http://onekeyadmin.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: MUKE <513038996@qq.com>
// +----------------------------------------------------------------------
namespace plugins\blog\api\validate;

use think\Validate;

class UserNotice extends Validate
{
    protected $rule = [
        'id'            => 'require|number',
        'type'          => 'require',
        'notice'        => 'require',
        'user_id'       => 'require',
        'page'          => 'require|number',
    ];
    protected $message  =   [
        'id.require'            => '编号不能为空',
        'id.number'             => '编号类型错误',
        'type.require'          => '类型不能为空',
        'notice.require'        => '通知不能为空',
        'user_id.number'        => '用户id不能为空',
        'page.require'          => '分页不能为空',
        'page.number'           => '分页类型错误',
    ];
    protected $scene = [
        'index'       => ['page','type'],
        'save'        => ['id', 'user_id','notice','type'],
    ];
}